On Detection of Gapped Code Clones using Gap Locations
نویسندگان
چکیده
It is generally said that code clone is one of the factors to make software maintenance difficult. A code clone is a code portion in source files that is identical or similar to another. Clones are introduced because of various reasons such as reusing code by ‘copy-and-paste’ and so on. Since developers usually modify the copied-and-pasted code portions, there are some gaps between the original code portion and it. Here, we call such code portions include some gaps Gapped code clone. Up to the present, several code clone detection methods, which give consideration to such gap, have been proposed. However, it needs a lot of cost to detect all the gapped code clones. This paper proposes a new method to visualize the gapped code clones just as if they were actually detected, based on the detection results of conventional code clone. Using the proposed method, the developer can specify the target clones efficiently. Moreover, we implement the proposed method into the maintenance support environment and conduct the experimental evaluation.
منابع مشابه
Generating Gapped Code Clone Information using Graph Mining Algorithm
At present, various kinds of code clone detection techniques have veen proposed. However, most of them cannot detect gapped code clones, which are ones that includes non-duplicated segments to its correspondant code clones. In this paper, we propose a method generating gapped code clone information from a detection result of existing code clone detection tools. The method adopts AGM (Apriori-ba...
متن کاملImproving the Unification of Software Clones Using Tree and Graph Matching Algorithms
Improving the Unification of Software Clones using Tree and Graph Matching Algorithms Giri Panamoottil Krishnan Code duplication is common in all kind of software systems and is one of the most troublesome hurdles in software maintenance and evolution activities. Even though these code clones are created for the reuse of some functionality, they usually go through several modifications after th...
متن کاملA New Method to Detect Gapped Code Clones
It is generally said that code clone is a factor to make software maintenance difficult. A code clone is the set of code portions in source files that are identical or similar to another. If we make some changes in such a code portion, it might be necessary to apply the same changes in its clones. A code clone introduced by ‘copy-and-paste ’reusing tends to have gaps because the developer often...
متن کاملMeasurement-based quantum computer in the gapped ground state of a two-body Hamiltonian.
We propose a scheme for a ground-code measurement-based quantum computer, which enjoys two major advantages. First, every logical qubit is encoded in the gapped degenerate ground subspace of a spin-1 chain with nearest-neighbor two-body interactions, so that it equips built-in robustness against noise. Second, computation is processed by single-spin measurements along multiple chains dynamicall...
متن کاملCoCloRep: A DSL for Code Clones
Code clones are pieces of code that are duplicated in multiple locations in the source code of a software application. The existence of these clones and the availability of clone detection tools to find them lend to the need for techniques to analyze the clones in an effort to enhance the quality of the source code. This paper describes an investigation into the development of CoCloRep, a Domai...
متن کامل